;(function() {
	const baseSize = 16; // 32
	const resizeEvent = 'orientationchange' in window ? 'orientationchange' : 'resize'
	function setRem() {
		const scale = document.documentElement.clientWidth / 375; // 750
		document.documentElement.style.fontSize =
			(baseSize * Math.min(scale, 2)) + "px";
	}
	window.addEventListener(resizeEvent, setRem, false)
	document.addEventListener('DOMContentLoaded', setRem, false)
})();
